﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Reflection;

namespace AzureDriverExplorer_Client
{
    /// <summary>
    /// About.xaml の相互作用ロジック
    /// </summary>
    public partial class About : Window
    {
        private System.Resources.ResourceManager ResManager;
        private Const cons = new Const();
        public About()
        {
            InitializeComponent();
            this.lblVersion.Content = Assembly.GetExecutingAssembly().GetName().Version.ToString();
            _SetLanguage();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void tbUrl_MouseDown(object sender, MouseButtonEventArgs e)
        {
            if (e.ButtonState == MouseButtonState.Pressed)
            {
                if (e.ChangedButton == MouseButton.Left)
                {
                    System.Diagnostics.Process.Start("http://azuredriveexplorer.codeplex.com/");
                }
            }
        }

        private void _SetLanguage()
        {
            ResManager = new System.Resources.ResourceManager("AzureDriverExplorer_Client.Properties.Resources", this.GetType().Assembly);

            lblVersionTitle.Content = ResManager.GetString("About_Version" + cons.Language).Trim();
            lblCompanyTitle.Content = ResManager.GetString("About_Company" + cons.Language).Trim();
            lblAuthorTitle.Content = ResManager.GetString("About_Author" + cons.Language).Trim();
            btnClose.Content = ResManager.GetString("About_BtnClose" + cons.Language).Trim();
            tbSlogan.Text = ResManager.GetString("About_Slogan" + cons.Language).Trim();
        }
    }
}